package com.example.demo1104.demo3;

import java.util.ArrayList;
import java.util.Collections;

public class Test02 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        Collections.addAll(list,"小猪","小李","马云","马化腾","王健林");


        list.stream()
                .filter(item->item.startsWith("小"))
                .filter(item->item.length()==2)
                .forEach(item->System.out.println(item));




    }
    public static void fun(){}
}
